package com.tuanzi.loan.business.service.system;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.entity.system.Schedule;
import com.tuanzi.loan.core.service.BaseService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.system.ScheduleSearchRequest;
import com.tuanzi.loan.vo.response.system.ScheduleSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public interface ScheduleService extends BaseService<Schedule, String> {

	Page<ScheduleSearchResponse> list(PageSearcher<ScheduleSearchRequest> pageSearcher);

	void rescheduleJob(String triggerName, String triggerGroup, String cron);

	void pauseJob(String taskName, String taskGroup);

	void resumeJob(String taskName, String taskGroup);

	void runJobRightNow(String taskName, String taskGroup);

	void addJob(Schedule schedule);

	void editJob(Schedule schedule);

	void deleteJob(String taskId);
}
